<template>
  <div class="right-list">
    <div class="name">{{ categoryList.categoryName }}</div>
    <div class="category-container">
      <CategoryItem
        v-for="(item, index) in categoryList.spuList"
        :key="index"
        :item="item"
      />
    </div>
  </div>
</template>
<script>
import CategoryItem from "../components/CategoryItem";
export default {
  components: {
    CategoryItem,
  },
  props: {},
  data() {
    return {};
  },
  //事件处理器
  methods: {},
  // 计算属性
  computed: {
    categoryList() {
      return this.$store.state.showListData;
    },
  },
  //侦听器
  watch: {},
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
};
</script>
<style scoped>
/* @import url(); 引入css类 */
.right-list {
  padding: 0.625rem;
}
.name {
  font-size: 0.75rem;
  height: 2.25rem;
  line-height: 2.25rem;
}
.category-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
</style>
